home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1997
/
HAM Radio 1997.iso
/
vcls
/
moden
/
examples
/
exstat0.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-04-08
|
2KB
|
76 lines
unit Exstat0;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, ExtCtrls, AdTerm, AdProtcl, AdPort;
type
TForm1 = class(TForm)
ApdComPort1: TApdComPort;
ApdProtocol1: TApdProtocol;
ApdTerminal1: TApdTerminal;
Panel1: TPanel;
BytesTransferred: TLabel;
FileName: TLabel;
BytesRemaining: TLabel;
FN: TLabel;
BT: TLabel;
BR: TLabel;
StartTransmit: TButton;
Cancel: TButton;
Msg: TLabel;
MS: TLabel;
procedure ApdProtocol1ProtocolStatus(CP: TObject; Options: Word);
procedure StartTransmitClick(Sender: TObject);
procedure CancelClick(Sender: TObject);
procedure ApdProtocol1ProtocolFinish(CP: TObject; ErrorCode: Integer);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.ApdProtocol1ProtocolStatus(CP: TObject; Options: Word);
begin
case Options of
apFirstCall : {do setup stuff} ;
apLastCall : {do cleanup stuff} ;
else begin {show status}
FN.Caption := ApdProtocol1.FileName;
BT.Caption := IntToStr(ApdProtocol1.BytesTransferred);
BR.Caption := IntToStr(ApdProtocol1.BytesRemaining);
MS.Caption := ApdProtocol1.StatusMsg(ApdProtocol1.ProtocolStatus);
end;
end;
end;
procedure TForm1.StartTransmitClick(Sender: TObject);
begin
ApdTerminal1.Active := False;
ApdProtocol1.StartTransmit;
end;
procedure TForm1.CancelClick(Sender: TObject);
begin
ApdProtocol1.CancelProtocol;
ApdTerminal1.SetFocus;
end;
procedure TForm1.ApdProtocol1ProtocolFinish(CP: TObject;
ErrorCode: Integer);
begin
ApdTerminal1.Active := True;
ApdTerminal1.SetFocus;
end;
end.